<?php

namespace Drinkiit\BlogBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;

class ContactType extends AbstractType
{
    public function buildForm(FormBuilder $builder, array $options)
    {
        $builder
            ->add('pseudo', 'text', array( 'label' => 'Pseudo' ) )
            ->add('mail', 'email', array( 'label' => 'Email (facultatif)', 'required' => false ) )
            ->add('message', 'textarea', array( 'label' => 'Votre message' ) )
            ->add('section', 'hidden')
            ->add('captcha', 'captcha', array( 'label' => 'Contrôle de votre humanité', 'expiration' => 10 ) )
        ;
    }

    public function getName()
    {
        return 'visitor_contact';
    }
}
